package com.easy.service.impl;

import com.easy.bean.Guests;
import com.easy.dao.IGuestsDao;
import com.easy.service.IGuests;
import com.easy.util.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GuestsImpl implements IGuests {

    @Autowired
    IGuestsDao dao;

    public Guests getGuests(int id){
        return dao.getGuests(id);
    }

    @Override
    public int addGuests(Guests guests) {
        int count=dao.addGuests(guests);
        return count;
    }

    //删除
    @Override
    public int  delGuests(Guests guests){
        return dao.delGuests(guests);
    }

    @Override
    public int del(int id) {
        int count=dao.del(id);
        return count;
    }

    //修改
    @Override
    public int editGuests(Guests guests){
        int count=dao.editGuests(guests);
        return count;
    }

    @Override
    public int editGuests_check(Guests guests){
        int count=dao.editGuests_check(guests);
        return count;
    }

    @Override
    public List<Guests> getSearchEmployess(Guests guests, Page page) {
        return dao.getSearchGuests(guests,page);
    }

    public int getCount(Guests guests){
        return dao.getCount(guests);
    }

}
